package com.smartleanx.module.hrm.controller.admin.employee.vo;

import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.smartleanx.framework.excel.core.annotations.DictFormat;
import com.smartleanx.framework.excel.core.convert.DictConvert;
import com.smartleanx.module.system.enums.DictTypeConstants;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDate;
import java.time.LocalDateTime;

@Schema(description = "管理后台 - 员工导出 Response VO")
@Data
public class EmployeeExportVo {

    @Schema(description = "姓名")
    @ExcelProperty("姓名")
    private String name;

    @Schema(description = "员工号")
    @ExcelProperty("员工号")
    private String employeeNo;

    @Schema(description = "性别")
    @ExcelProperty(value = "性别",converter = DictConvert.class)
    @DictFormat(DictTypeConstants.USER_SEX)
    private Integer sex;

    @Schema(description = "部门名称")
    @ExcelProperty("部门名称")
    private String deptName;

    @Schema(description = "入职时间")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @ExcelProperty("入职时间")
    private LocalDate entryTime;

    @Schema(description = "转正时间")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @ExcelProperty("转正时间")
    private LocalDate regularizationTime;

    @Schema(description = "司龄")
    @ExcelProperty("司龄")
    private Long companyAge;

    @Schema(description = "工作地点")
    @ExcelProperty("工作地点")
    private String workAddress;

    @Schema(description = "员工状态")
    @ExcelProperty("员工状态")
    private String state;

    @Schema(description = "聘用形式")
    @ExcelProperty("聘用形式")
    private String employmentForm;

    @Schema(description = "现合同结束日期")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @ExcelProperty("现合同结束日期")
    private LocalDate contractEndTime;
}
